﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using AntsCode.StorageClientExtensions;
using Microsoft.WindowsAzure;
using System.Data.Services.Client;

namespace TestHarnessWebRole.Data
{
    public class TestTableServiceContext : XTableServiceContext
    {
        public TestTableServiceContext(string baseAddress, StorageCredentials credentials) :
            base(baseAddress, credentials)
        {
            // Disable entity tracking to increase performance
            this.MergeOption = MergeOption.NoTracking;
        }

        public XTableServiceQuery<Location> Location
        {
            get
            {
                return this.CreateQuery<Location>("Location");
            }
        }

        public XTableServiceQuery<Company> Company
        {
            get
            {
                return this.CreateQuery<Company>("Company");
            }
        }

        public XTableServiceQuery<Customer> Customer
        {
            get
            {
                return this.CreateQuery<Customer>("Customer");
            }
        }

        public XTableServiceQuery<Order> Order
        {
            get
            {
                return this.CreateQuery<Order>("Order");
            }
        }
    }
}
